﻿<%@ Page Language="C#" ValidateRequest ="false" AutoEventWireup="true" CodeFile="SiteParams.aspx.cs" Inherits="GreatB2C.Web.Manage.SystemSet.SiteInfo.SiteParams" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>网站参数配置</title>
    <link href="../../../App_Themes/AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/MasterPage.css" type="text/css" rel="stylesheet" />
    <link href="../../../App_Themes/AdminDefaultTheme/xtree.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" src="../../..../../../Resource/Script/jquery-1.4.2.min.js"></script>

    <script src="../../..../../../Resource/Script/jquery.validate.min.js" type="text/javascript"></script>
    
    <script type="text/javascript" src="../../../Component/tiny_mce/tiny_mce.js"></script>

    <script type="text/javascript">
        $().ready(function() {
            tinyMCE.init({
                // General options
                mode: "textareas",
                theme: "advanced",
                skin: "default",
                plugins: "autolink,lists,pagebreak,style,layer,table,,advimage,advlink,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable",

                // Theme options
                theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,formatselect,fontselect,fontsizeselect,|,bullist,numlist,|,forecolor,backcolor,|,fullscreen",
                theme_advanced_buttons2: "",
                theme_advanced_buttons3: "",
                theme_advanced_buttons4: "",
                theme_advanced_toolbar_location: "top",
                theme_advanced_toolbar_align: "left",
                theme_advanced_statusbar_location: "bottom",

                theme_advanced_resizing: false,

                // Example word content CSS (should be your site CSS) this one removes paragraph margins
                content_css: "css/word.css",

                language: "zh",

                // Replace values for the template plugin
                template_replace_values: {
                    username: "betterlife",
                    staffid: "123456"
                }
            });
        
            // validate signup form on keyup and submit
            $("#form1").validate({
                rules: {
                    txtManageDir: {
                        required: true
                    }
                    , txtTicketTime: {
                        required: true
                        , digits: true
                    }
                    ,txtSiteTitle: {
                        required: true
                    }
                    ,txtSiteManageCode:{
                        required: true                       
                    }
                    , txtCreateHtmlPath: {
                        required: true                       
                    }
                    , txtTemplateDir: {
                        required: true                       
                    }
                    , txtSkinDirConfig: {
                        required: true                       
                    }
                    , radlIsAutoSignin: {
                        required: true                       
                    }
                    , txtAutoSigninTime: {
                        required: true     
                        ,digits:true
                    }
                    , txtRefreshQueueSize: {
                        required: true     
                        ,digits:true
                    }
                },
                messages: {
                    txtManageDir: {
                        required: "<font class='validatemsg'>* 请输入后台管理目录</font>"
                    }
                    , txtTicketTime: {
                        required: "<font class='validatemsg'>* 请输入管理员身份验证票过期时间</font>"
                        , digits: "<font class='validatemsg'>* 管理员身份验证票过期时间格式不正确，请输入整数</font>"
                    }
                    ,txtSiteManageCode: {
                        required: "<font class='validatemsg'>* 请输入后台管理认证码</font>"
                    }
                    , txtCreateHtmlPath: {
                        required: "<font class='validatemsg'>* 请输入网站生成目录</font>"
                    }
                    , txtTemplateDir: {
                        required: "<font class='validatemsg'>* 请输入网站模板根目录</font>"
                    }
                    , txtSkinDirConfig: {
                        required: "<font class='validatemsg'>* 请输入前台模板风格目录</font>"
                    }
                    , radlIsAutoSignin: {
                        required: "<font class='validatemsg'>* 请输入前台模板风格目录</font>"
                    }
                    , txtAutoSigninTime: {
                        required: "<font class='validatemsg'>* 请输入自动签收内容时间</font>"
                        , digits: "<font class='validatemsg'>* 自动签收内容时间格式不正确，请输入整数</font>"
                    }
                    , txtRefreshQueueSize: {
                        required: "<font class='validatemsg'>* 请输入防刷新队列长度</font>"
                        , digits: "<font class='validatemsg'>* 防刷新队列长度格式不正确，请输入整数</font>"
                    }
                }
            });

        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
        <tr align="center">
            <td colspan="2" class="spacingtitle">
                <strong>网站参数配置</strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft" style="width: 30%">
                <strong>后台管理目录：</strong><br />
                为了安全，您可以在此修改后台管理目录名称，<br />
                为空时默认为Admin，实际文件夹名不需更改。<br />
                <span style="color: #FF0000">注意：目录名只能以字母、数字及下划线组成，<br />
                    且目录名不能与系统根目录下文件夹重名（除Admin外）。</span>
            </td>
            <td>
                <asp:TextBox ID="txtManageDir" Text="Manage" MaxLength="20" TextMode="singleLine"
                    runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="ValeManageDir" runat="server" ControlToValidate="txtManageDir"
                    Display="Dynamic" ErrorMessage="* 目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>管理员身份验证票过期时间：</strong><br />
                管理员登录后台后，在不操作的情况下自动保持登录状态的时间设置。<br />
                <span style="color: #FF0000">注意：如果为0则在当前浏览器保持登录状态。<br />
                    修改管理员身份验证票过期时间，必须在下次登录后台才能生效。 </span>
            </td>
            <td>
                <asp:TextBox ID="txtTicketTime" runat="server" MaxLength="6" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';" ></asp:TextBox>&nbsp;分钟
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>是否启用后台管理认证码：</strong>
            </td>
            <td>
                <asp:RadioButtonList ID="radlEnableSiteManageCode" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>后台管理认证码：</strong><br />
                <asp:Label ID="LblNotes" runat="server" Text="该后台管理认证码还是系统默认值，为了网站安全，请及时修改！" ForeColor="red"
                    Visible="false"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtSiteManageCode" runat="server" MaxLength="20" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>管理员登录后台是否同时将前台关联用户登录：</strong>
            </td>
            <td>
                <asp:RadioButtonList ID="radlAdminIsLoginUser" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>管理员退出后台是否同时将前台关联用户退出：</strong>
            </td>
            <td>
                <asp:RadioButtonList ID="radlAdminIsLogoutUser" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>前台默认语言：</strong>
            </td>
            <td>
                <asp:DropDownList ID="ddlCultureName" runat="server">
                    <asp:ListItem Value="CN" Text="中文(中国) [zh-CN]"></asp:ListItem>
                    <asp:ListItem Value="EN" Text="英文(美国) [en-US]"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>是否使用软键盘输入密码：</strong><br />
                若选择是，则管理员登录后台时使用软键盘输入密码，适合网吧等场所上网使用。
            </td>
            <td>
                <asp:RadioButtonList ID="radlEnableSoftKey" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>网站根域名：</strong><br />
                在启用子域名单点登录的情况下，必须要设置此值。
            </td>
            <td>
                <asp:TextBox ID="txtMainDomain" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <br />
                例如：如果你的网址是http://www.baidu.com，那么这里就要填写 <span style="color: #FF0000"><strong>baidu.com</strong></span>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>是否对数据库连接字符串加密：</strong>
            </td>
            <td>
                <asp:RadioButtonList ID="radlConnProtecte" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>是否启用点券、金额、积分、有效期功能：</strong><br />
                <span style="color: #FF0000">注意：此功能仅限于“CMS模块”</span>
            </td>
            <td>
                <asp:RadioButtonList ID="radlEnablePointMoneyExp" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>网站广告目录：</strong><br />
                为了不让广告拦截软件拦截网站的广告，<br />
                您可以修改广告JS的存放目录（默认为Advertisement），改过以后，需要再设置此处
            </td>
            <td>
                <asp:TextBox ID="txtADDir" Text="Advertisement" MaxLength="20" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtADDir"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>网站生成目录：</strong><br />
                <span style="color: #FF0000">注意：如果生成在根目录下，请保留为空！</span>
            </td>
            <td>
                <asp:TextBox ID="txtCreateHtmlPath" Text="html" MaxLength="20" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtCreateHtmlPath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>内嵌代码生成路径：</strong><br />
            </td>
            <td>
                <asp:TextBox ID="txtIncludeFilePath" Text="Include" MaxLength="20" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtIncludeFilePath"
                    Display="Dynamic" ErrorMessage="目录名只能以字母、数字及下划线组成" SetFocusOnError="True" ValidationExpression="[_a-zA-Z0-9]{1,}"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>网站模板根目录：</strong><br />
                为防止别人猜测到模板存放地址，<br />
                您可以在此输入多层目录做为网站模板的根目录，最好在取带“#”号的目录名。<br />
                目录的格式如下：#Template1/Template2/模板方案
            </td>
            <td>
                <asp:TextBox ID="txtTemplateDir" Text="#Template" MaxLength="40" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>前台模板风格目录：</strong><br />
                前台模板风格目录对应网站根目录下的Skin目录下的文件夹。<br />
            </td>
            <td>
                <asp:TextBox ID="txtSkinDirConfig" Text="Default" MaxLength="40" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>是否启用内容自动签收：</strong>
            </td>
            <td>
                <asp:RadioButtonList ID="radlIsAutoSignin" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>自动签收内容时间：</strong><br />
                单位：秒。启用自动签收后，此设置才起作用。
            </td>
            <td>
                <asp:TextBox ID="txtAutoSigninTime" Text="10" MaxLength="20" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>防刷新队列长度：</strong><br />
                队列长度越长，防止用户恶意刷新提交重复表单越有效。
            </td>
            <td>
                <asp:TextBox ID="txtRefreshQueueSize" Text="10" MaxLength="20" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>采集休眠时间：</strong><br />
                每采集5篇信息服务器强制休眠指定秒数，不休眠可以填写0。
            </td>
            <td>
                <asp:TextBox ID="txtCollectionSleep" Text="0" MaxLength="5" runat="server" CssClass="inputtext" Width="400px" onfocus="this.style.backgroundColor='#d2e0f0';" onblur="this.style.backgroundColor='';"></asp:TextBox>
                <asp:RegularExpressionValidator ID="ValgCollectionSleep" runat="server" ControlToValidate="txtCollectionSleep"
                    ErrorMessage="* 只能输入正整数" ValidationExpression="^([0-9])(\d{0,})(\d{0,})$" Display="Dynamic" />
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>是否启用防恶意刷新点击数功能：</strong><br />
                启用此功能后同一用户每刷新一次并不会增加点击数，只有重新打开浏览器才会被统计到。
            </td>
            <td>
                <asp:RadioButtonList ID="radlEnableRefreshHits" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem alue="0">否</asp:ListItem>
                    <asp:ListItem Value="1">是</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>网站当前状态：</strong><br />
                维护期间可设置关闭状态
            </td>
            <td>
                <asp:RadioButtonList ID="radlSiteStatus" runat="server" RepeatDirection="Horizontal"
                    RepeatLayout="Flow">
                    <asp:ListItem Value="1">打开</asp:ListItem>
                    <asp:ListItem Value="0">关闭</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>邮件确认模板管理：</strong><br />
                标签含义：<br />
                {$ConfirmSubscribeEmail}：订阅
            </td>
            <td>
	            <textarea id="txtMailConfirmTemplate" name="txtMailConfirmTemplate" rows="15" cols="80" style="width: 400px" runat="server">
	            </textarea>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>邮件退订模板管理：</strong><br />
            </td>
            <td>
	            <textarea id="txtMailUnsubscribe" name="txtMailUnsubscribe" rows="15" cols="80" style="width: 400px" runat="server">
	            </textarea>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbgleft">
                <strong>维护说明：</strong><br />
                在网站关闭状态下显示，支持html语法
            </td>
            <td>
	            <textarea id="txtSiteMaintainDescription" name="txtSiteMaintainDescription" rows="15" cols="80" style="width: 400px" runat="server">
	            </textarea>
            </td>
        </tr>
        <tr class="tdbgbottom">
            <td colspan="2">
                <asp:Button ID="BtnSubmit" runat="server" Text="保存设置[S]" class="btnstyle_blue" Style="width: 90px;"
                    AccessKey="S" onmouseover="this.className='btnstyle_blue_over'" onmouseout="this.className='btnstyle_blue'"
                    OnClick="BtnSubmit_Click" />&nbsp;&nbsp;
                <input type="reset" name="ClearSiteInfo" value="重 填[R]" class="btnstyle_blue" id="btnSiteInfoReset"
                    accesskey="R" style="width: 70px;" runat="server" onmouseover="this.className='btnstyle_blue_over'"
                    onmouseout="this.className='btnstyle_blue'" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
